package com.vogue.supplymall.order.domain.service;

import com.vogue.supplymall.common.domain.dto.CommentInfo;
import com.vogue.supplymall.common.domain.dto.RelevanceInfo;
import com.vogue.supplymall.common.domain.dto.UserInfo;
import com.vogue.supplymall.order.domain.model.Comment;

import java.util.List;
import java.util.Map;

/**
 * 买家、卖家评论
 */
public interface CommentService extends BaseService<Comment, Long> {

	public Map<String, Object> saveOrUpdateCommentInfo(CommentInfo commentInfo,UserInfo info);

    /**
     * 待评价数量
     * @param relevanceInfo
     * @return
     */
    public Map<String,Object> getCommentingCount(RelevanceInfo relevanceInfo);
    public Map<String,Object> getCommentingCount(CommentInfo commentInfo);
    /**
     * 已评价数量
     * @param relevanceInfo
     * @return
     */
    public Map<String,Object> getFinishCommentCount(RelevanceInfo relevanceInfo);

    /**
     * 查看买家 评价列表
     * @param commentInfo
     * @return
     */
    Map<String, Object> findBuyerCommentList(CommentInfo commentInfo);

    /**
     * 查看卖家 评价列表
     * @param commentInfo
     * @return
     */
    public Map<String, Object>  findSellerCommentList(CommentInfo commentInfo);

    /**
     * 置是否需要回复标记
     */
    public void updateRestoreflag(Long commentId,int restoreFlag) throws Exception;
    
    /**
     * 删除卖家回复评价
     */
    public void delSellerComment(Long detailId,Long commentId) throws Exception;
    
    /**
     * 置已读标记
     */
    public void setValueForReadFlag(Long commentId,int objectFlag) throws Exception;

    /**
     * 获取卖家的默认回复
     * @param commentInfo
     * @return
     */
    public List<Map<String, Object>> getDefaultAnswer(CommentInfo commentInfo);
}
